from django.conf.urls.defaults import *
import os
import tsuchinoco.settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    (r'^$', 'tsuchinoco.accounts.views.login'),
    (r'^login/$', 'tsuchinoco.accounts.views.login'),
    (r'^portal/(?P<user_id>\d+)/', 'tsuchinoco.portal.views.portal'),
    (r'^task/$', 'tsuchinoco.tasks.views.taskindex'),
    (r'^task/(?P<user_id>\d+)/edit/$', 'tsuchinoco.tasks.views.newedit'), 
    (r'^task/(?P<user_id>\d+)/(?P<task_id>\d+)/$', 'tsuchinoco.tasks.views.taskedit'),
    (r'^wiki/$', 'tsuchinoco.knowlege.views.content_index'),
    (r'^newwiki/$', 'tsuchinoco.knowlege.views.new_content'),
    (r'^wikiedit/(?P<user_id>\d+)/(?P<content_id>\d+)/$', 'tsuchinoco.knowlege.views.content_edit'), 
    (r'^comment/(?P<content_id>\d+)/$', 'tsuchinoco.knowlege.views.comment_post'), 
    (r'^plan/$', 'tsuchinoco.schedule.views.plan_index'),
    (r'^newplan/$', 'tsuchinoco.schedule.views.newedit'),
    (r'^planedit/(?P<user_id>\d+)/(?P<plan_id>\d+)/$', 'tsuchinoco.schedule.views.plan_edit'), 

    # Uncomment the next line to enable the admin:
    (r'^admin/(.*)', admin.site.root),
    (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': tsuchinoco.settings.MEDIA_ROOT}),
)
